﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.views.components.*;
    import net.wooga.pets.constants.*;

    public class ElevatorRoofMediator extends RenderListMediator {

		[Inject]
        public var elevatorRoofDisplay:ElevatorRoofDisplay;

        override public function onRegister():void{
            super.onRegister();
            eventMap.mapListener(eventDispatcher, UpdateDisplayEvent.UPDATE_ROOF_DISPLAY, this.updateDisplay);
            eventMap.mapListener(eventDispatcher, CommandConstants.CLEAR_SCENE, this.clearScene);
        }
        private function updateDisplay(_arg1:UpdateDisplayEvent):void{
            if (_arg1.id == this.elevatorRoofDisplay.id){
                this.elevatorRoofDisplay.y = _arg1.y;
                updateRenderList();
            };
        }
        private function clearScene(_arg1:Event):void{
            l(("clearScene: " + this.clearScene));
            this.elevatorRoofDisplay.remove();
        }

    }
}//package net.wooga.pets.views 
